home *** CD-ROM | disk | FTP | other *** search
/ Macintosh Compilation 1 / Macintosh Compilation CD Number 1 (December 1995).iso / Internet / InterPPP™ 1.2.1 / Generic CCLs / US Robotics Sport PPP < prev   
Encoding:
Text File  |  1994-07-07  |  3.4 KB  |  206 lines

  1. ! "US Robotics Courier Sporter for PPP"
  2. !
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 19200, 0, 8, 1
  8. !
  9. ! first recall the factory configuration, and get the modem in enhanced command state
  10. !
  11. matchclr
  12. matchstr 1 4 "OK\13\10"
  13. write "AT&F\13"
  14. matchread 30
  15. jump 59
  16. !
  17. ! Next, Set up the configuration: drop connection after losing DTR
  18. !                Turn off auto answer and echo
  19. !
  20. @LABEL 4
  21. pause 5
  22. matchstr 1 5 "OK\13\10"
  23. write "AT&D2S0=0E0\13"
  24. matchread 30
  25. jump 59
  26. !
  27. ! Next, turn on CTS flow control, normal error control,
  28. !    extended result codes, no ARQ result code modifiers
  29. !
  30. @LABEL 5
  31. pause 5
  32. matchstr 1 6 "OK\13\10"
  33. write "ATX4&A0\13"
  34. matchread 30
  35. jump 59
  36. !
  37. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  38. !
  39. @LABEL 6
  40. ifstr 2 8 "1"
  41. pause 5
  42. matchstr 1 8 "OK\13\10"
  43. write "ATM0\13"
  44. matchread 30
  45. jump 59
  46. !
  47. ! The modem is ready so enable answering, or originate a call
  48. !
  49. @LABEL 8
  50. pause 5
  51. ifANSWER 30
  52. note "Dialing ^1" 3
  53. write "ATDT^1\13"
  54. !
  55. @LABEL 9
  56. matchstr 1  11 "CONNECT 1200\13\10"
  57. matchstr 2  12 "CONNECT 2400\13\10"
  58. matchstr 3  13 "CONNECT 4800\13\10"
  59. matchstr 4  19 "CONNECT 7200\13\10"
  60. matchstr 5  14 "CONNECT 9600\13\10"
  61. matchstr 6  20 "CONNECT 12000\13\10"
  62. matchstr 7  18 "CONNECT 14400\13\10"
  63. matchstr 8  50 "NO CARRIER\13\10"
  64. matchstr 9  50 "ERROR\13\10"
  65. matchstr 10 52 "NO DIAL TONE\13\10"
  66. matchstr 11 53 "BUSY\13\10"
  67. matchstr 12 54 "NO ANSWER\13\10"
  68. matchread 700
  69. jump 59
  70. !
  71. @LABEL 11
  72. note "Communicating at 1200 bps." 2
  73. serreset 1200, 0, 8, 1
  74. jump 15
  75. !
  76. @LABEL 12
  77. note "Communicating at 2400 bps." 2
  78. serreset 2400, 0, 8, 1
  79. jump 15
  80. !
  81. @LABEL 13
  82. note "Communicating at 4800 bps." 2
  83. serreset 4800, 0, 8, 1
  84. jump 15
  85. !
  86. @LABEL 19
  87. note "Communicating at 7200 bps." 2
  88. serreset 9600, 0, 8, 1
  89. CommunicatingAt 7200
  90. jump 15
  91. !
  92. @LABEL 14
  93. note "Communicating at 9600 bps." 2
  94. serreset 9600, 0, 8, 1
  95. jump 15
  96. !
  97. @LABEL 20
  98. note "Communicating at 12000 bps." 2
  99. serreset 19200, 0, 8, 1
  100. CommunicatingAt 12000
  101. jump 15
  102. !
  103. @LABEL 18
  104. note "Communicating at 14400 bps." 2
  105. serreset 19200, 0, 8, 1
  106. CommunicatingAt 14400
  107. jump 15
  108. !
  109. @LABEL 15
  110. HSReset 0 1 0 0 0 0 
  111. ifANSWER 16
  112. pause 30
  113. @LABEL 16
  114. exit 0
  115. !
  116. ! @ANSWER
  117. ! Set up the modem to answer
  118. @LABEL 30
  119. write "ATS0=1\13"
  120. matchstr 1 31 "OK\13\10"
  121. matchread 30
  122. jump 59
  123. !
  124. @LABEL 31
  125. matchstr 1  32 "RING\13\10"
  126. matchstr 2  11 "CONNECT 1200\13\10"
  127. matchstr 3  12 "CONNECT 2400\13\10"
  128. matchstr 4  13 "CONNECT 4800\13\10"
  129. matchstr 5  19 "CONNECT 7200\13\10"
  130. matchstr 6  14 "CONNECT 9600\13\10"
  131. matchstr 7  20 "CONNECT 12000\13\10"
  132. matchstr 8  18 "CONNECT 14400\13\10"
  133. matchstr 9  50 "NO CARRIER\13\10"
  134. matchstr 10 50 "ERROR\13\10"
  135. matchstr 11 52 "NO DIAL TONE\13\10"
  136. matchstr 12 53 "BUSY\13\10"
  137. matchstr 13 54 "NO ANSWER\13\10"
  138. matchread 700
  139. jump 31
  140. !
  141. @LABEL 32
  142. userhook 1
  143. note "Answering phone…" 2
  144. jump 31
  145. !
  146. ! 50: error messages
  147. !
  148. @LABEL 50
  149. exit -6021
  150. !
  151. @LABEL 52
  152. exit -6020
  153. !
  154. @LABEL 53
  155. exit -6022
  156. !
  157. @LABEL 54
  158. exit -6023
  159. !
  160. @LABEL 59
  161. exit -6019
  162. !
  163. ! Hang up the modem
  164. !
  165. @HANGUP
  166. @LABEL 60
  167. settries 0
  168. HSReset 0 0 0 0 0 0 
  169. @LABEL 61
  170. write "ATH\13"
  171. matchclr
  172. matchstr 1 62 "NO CARRIER\13\10"
  173. matchstr 2 62 "OK\13\10"
  174. matchstr 3 62 "ERROR\13\10"
  175. matchread 30
  176. inctries
  177. iftries 3 62
  178. ! no response, try escape sequence
  179. write "+++"
  180. matchclr
  181. matchstr 1 61 "OK\13\10"
  182. matchread 15
  183. ! try dropping DTR
  184. DTRClear
  185. pause 15
  186. DTRSet
  187. pause 15
  188. jump 61
  189. !
  190. @LABEL 62
  191. ! recall the factory settings
  192. pause 15
  193. write "AT&F\13"
  194. matchclr
  195. matchstr 1 63 "OK\13\10"
  196. matchread 30
  197. !
  198. @LABEL 63
  199. pause 5
  200. matchstr 1 64 "OK\13\10"
  201. write "ATS0=0\13"
  202. matchread 20
  203. !
  204. @LABEL 64
  205. exit 0
  206.